//
//  HourseDetailHeadViewCell.m
//  WGFGlobalHouses
//
//  Created by welldone on 15/5/10.
//  Copyright (c) 2015年 waiguofang. All rights reserved.
//

#import "HourseDetailHeadViewCell.h"
#import "HourseDetailData.h"
#import "IWNavigationController.h"
#import "UserModal.h"


@interface HourseDetailHeadViewCell ()

@property (nonatomic,strong)NSLayoutConstraint *layout;

@end


@implementation HourseDetailHeadViewCell




+(instancetype) cellWithTableView:(UITableView *)tableview;
{
    static NSString *ID = @"HourseDetailHeadViewCell";
    HourseDetailHeadViewCell *cell = [tableview dequeueReusableCellWithIdentifier:ID];
    if (cell == nil)
    {
        cell = [[[NSBundle mainBundle]loadNibNamed:@"HourseDetailHeadViewCell" owner:nil options:nil]lastObject];
        
        [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
    
        [cell.headView initView];
    }
    
    return cell;
}


+(CGFloat)getHight:(HourseDetailData *)data withTableView:(UITableView *)tableView{
    
    static HourseDetailHeadViewCell *cell = nil;
    
    static dispatch_once_t predicate;
    dispatch_once(&predicate, ^{
        
       
    });
    
     cell = [HourseDetailHeadViewCell cellWithTableView:tableView];
    
     [cell setData:data nvc:nil];
    
    CGFloat height = [cell.contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize].height;
    
    return  height+1;
}



-(void)setData:(HourseDetailData*)data{}

    
-(void)setData:(HourseDetailData*)data nvc:(UINavigationController *)nvc{
    
   
    
    [self.headView setData:data nvc:nvc];
    
}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
